<template>
  <div class="headers">
    <div class="footer">
      <router-view></router-view>
      <van-tabbar v-model="active" active-color="#ee0a24" inactive-color="#000">
        <van-tabbar-item replace to="/index/shopslist" icon="home-o"
          >首页</van-tabbar-item
        >
        <van-tabbar-item replace icon="chat-o" badge="99+"
          >消息</van-tabbar-item
        >
        <van-tabbar-item replace to="/index/order" icon="orders-o" dot
          >订单</van-tabbar-item
        >
        <van-tabbar-item replace to="/index/usersinfo" icon="user-circle-o"
          >个人主页</van-tabbar-item
        >
      </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      value: 4,
    };
  },
  methods: {
    // // 点击跳转到我的个人信息页面
    // usersinfo: function () {
    //   this.id = localStorage.getItem("id");
    //   console.log("id", this.id);
    //   // , params: { id: this.id }
    //   this.$router.push({ name: "usersinfo" });
    // },
  },
  created() {
    // 判断用户是否登录
    if (localStorage.getItem("token") != null) {
      this.name = localStorage.getItem("name");
    } else {
      this.name = "";
    }
  },
};
</script>

<style scoped>
.headers {
  widows: 100%;
  height: 100%;
}
</style>